import  {xsEntity} from './commentity';
import {  Column, Entity,  ManyToOne} from 'typeorm';
import { UserEntity } from './user';

/**
 * 描述
 */
@Entity()
export class FriendsEntity extends xsEntity {
    // @ManyToMany(() => UserEntity, UserEntity => UserEntity.friends)
    // @JoinTable()
    // user: UserEntity[];
    @ManyToOne(() => UserEntity, user => user.friends)
    user: UserEntity;
  
    @ManyToOne(() => UserEntity, user => user.friends)
    friend: UserEntity;
  
    @Column({ comment: '好友昵称', default: null })
    nickname: string;
  
    @Column({ comment: '好友头像', default: null })
    avatar: string;
}
